import base64


def image_to_base64(image_path):
    """将图片文件转换为Base64字符串
    Args:
        image_path (str): 图片文件路径
    Returns:
        str: Base64编码的字符串
    """
    with open(image_path, 'rb') as image_file:
        encoded_string = base64.b64encode(image_file.read()).decode('utf-8')
    return encoded_string
